#include<bits/stdc++.h>
using namespace std;
int c[100005];
int main(){
    freopen("duel4.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    scanf("%d",&n);
    int a[n+1];
    int b[n+1];
    for(int i=1;i<=n;i++){
        scanf("%d",&a[i]);
        b[i]=0;
    }
    for(int i=1;i<=n;i++){
        c[a[i]]++;
    }
    sort(a,a+n+1);
    while(1){
        int y=0;
        for(int i=1;i<=n;i++){
            if(b[i]!=2){
                for(int j=i+c[a[i]];j<=n;j++){
                    if(b[j]==0){
                        if(a[j]>a[i]){
                            b[j]=1;
                            b[i]=2;
                            y++;
                            break;
                        }
                    }
                }
            }
        }
        int x=1;
        for(int i=1;i<=n;i++){
            if(b[i]==0){
                x=0;
            }
        }
        if(x==1||y==0){
            break;
        }
    }
    int ans=0;
    for(int i=1;i<=n;i++)if(b[i]!=2)ans++;
    cout<<ans;
    return 0;
}
